
<template>
  <nav class="bar-footer">
    <router-link to="/home">
      <div class="foot-item">
        <i class="ico icon-home"></i><span class="foot-txt">首页</span>
      </div>
    </router-link>
    <router-link to="/sort">
      <div class="foot-item ">
        <i class="ico icon-sort"></i> <span class="foot-txt">分类</span>
      </div>
    </router-link>
    <router-link to="/activity">
      <div class="foot-item">
        <i class="ico icon-sort"></i> <span class="foot-txt">春茶活动</span>
      </div>
    </router-link>
    <router-link to="/shopcar">
      <div class="foot-item" >
        <i class="ico icon-cart"></i> <span class="foot-txt">购物车</span>
      </div>
    </router-link>
    <router-link to="/my">
      <div class="foot-item ">
        <i class="ico icon-my"></i> <span class="foot-txt">个人中心</span>
      </div>
    </router-link>
  </nav>
</template>

<script>
  export default {
    mounted(){
    },
    methods: {
    }

  }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  .router-link-exact-active.router-link-active {

  }

  .num {
    position: absolute;
    background-color: #f00;
    border-radius: 100%;
    text-align: center;
    color: #fff;
    font-size: .6rem;
    width: 20px;
    height: 20px;
    line-height: 20px;
    right: 50%;
    margin-right: -32px;
    top: 5px;
  }

  .bar-footer {
    bottom: 0;
    width: 100%;
    height: 2.5rem;
    padding: 0;
    table-layout: fixed;
    position: absolute;
    right: 0;
    left: 0;
    z-index: 100;
    background: #ffffff;
  }

  .foot-item {
    position: relative;
    width: 20%;
    float: left;
    height: 2.5rem;
    color: #3d3d3d;
    text-align: center;
    vertical-align: middle;
    padding-top: .4rem;
    font-size: 0;
  }

  .router-link-exact-active.router-link-active .foot-txt {
    color: #e80013;
  }

  .foot-item .ico {
    width: 1.6rem;
    height: 1rem;
    display: inline-block
  }

  .icon-home {
    background: url(image/home_2.svg) 0 0 no-repeat;
    background-size: 100% 100%;
  }

  .icon-sort {
    background: url(image/sort_2.svg) 0 0 no-repeat;
    background-size: 100% 100%;
  }

  .icon-cart {
    background: url(image/shopcar_2.svg) 0 0 no-repeat;
    background-size: 100% 100%;
  }

  .icon-my {
    background: url(image/my_2.svg) 0 0 no-repeat;
    background-size: 100% 100%;
  }

  .foot-txt {
    font-size: .6rem;
    color: #3d3d3d;
    display: block;
    text-align: center;
  }

  .router-link-exact-active.router-link-active .icon-home {
    background: url(image/home_1.svg) 0 0 no-repeat;
    background-size: 100% 100%;
  }

  .router-link-exact-active.router-link-active .icon-sort {
    background: url(image/sort_1.svg) 0 0 no-repeat;
    background-size: 100% 100%;
  }

  .router-link-exact-active.router-link-active .icon-cart {
    background: url(image/shopcar_1.svg) 0 0 no-repeat;
    background-size: 100% 100%;
  }

  .router-link-exact-active.router-link-active .icon-my {
    background: url(image/my_1.svg) 0 0 no-repeat;
    background-size: 100% 100%;
  }
 .router-link-active .icon-home {
    background: url(image/home_1.svg) 0 0 no-repeat;
    background-size: 100% 100%;
  }

 .router-link-active .icon-sort {
    background: url(image/sort_1.svg) 0 0 no-repeat;
    background-size: 100% 100%;
  }

.router-link-active .icon-cart {
    background: url(image/shopcar_1.svg) 0 0 no-repeat;
    background-size: 100% 100%;
  }

 .router-link-active .icon-my {
    background: url(image/my_1.svg) 0 0 no-repeat;
    background-size: 100% 100%;
  }
  .router-link-active .foot-txt {
    color: #e80013;
  }
</style>
